package com.wk.warehouse.service.impl;

import java.util.HashMap;
import java.util.List;
import com.wk.warehouse.entity.Statistics;
import com.wk.warehouse.mapper.StatisticsMapper;
import com.wk.warehouse.service.StatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StatisticsServiceImp implements StatisticsService {

	@Autowired
	private StatisticsMapper statisticsMapper;
	/**
	 * 统计库存不足的商品列表
	 */
	@Override
	public List<Statistics> statUnderStock(int storeId) {
		return statisticsMapper.statUnderStock(storeId);
	}
	/**
	 * 统计商品损耗比
	 */
	@Override
	public List<Statistics> statLossRatio(HashMap<String, Object> hashMap) {
		return statisticsMapper.statLossRatio(hashMap);
	}
	/**
	 * 统计商品销售比
	 */
	@Override
	public List<Statistics> statMarketRatio(Statistics stat) {
		return statisticsMapper.statMarketRatio(stat);
	}
	/**
	 * 统计下架商品
	 */
	@Override
	public List<Statistics> statOutProduct(int storeId) {
		return statisticsMapper.statOutProduct(storeId);
	}
	/**
	 * 统计规定时间内的采购量
	 */
	@Override
	public List<Statistics> statPurchase(Statistics stat) {
		return statisticsMapper.statPurchase(stat);
	}
	/**
	 * 统计不同分类下的商品库存
	 */
	@Override
	public List<Statistics> statInvent(int storeId) {
		return statisticsMapper.statInvent(storeId);
	}

	/**
	 * 各仓库的商品库存情况
	 */
	public List<Statistics> storeInvent(){
		return statisticsMapper.storeInvent();
	}

}
